const { defineConfig } = require('@vue/cli-service');
const compressionWebpackPlugin = require('compression-webpack-plugin');
module.exports = defineConfig({
  transpileDependencies: true,
  devServer: {
    port: 8888,
    open: true,
    hot: true,
    compress: true
  },
  configureWebpack: {
    plugins: [new compressionWebpackPlugin({
      algorithm: 'gzip'
    })],
    devtool: false,
    // 排除第三方库的打包, 减小打包文件的体积
    externals: {
      vue: 'Vue',
      vuex: 'Vuex',
      vant: 'vant'
    }
  }
})
